﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace VodafoneLiveTile
{
    
    public static class Utils
    {



        public static string GetManageUrisArgs(string type, string username, string password, string number, bool isFirstNumber, bool showDate, string id, bool enabled, bool enabledToast, bool isTrial)
        {
            return GetManageUrisArgs(type, username, password, number, isFirstNumber, showDate, id, "", "", enabled, enabledToast, isTrial);
        }
        public static string GetManageUrisArgs(string type, string username, string password, string number, bool isFirstNumber, bool showDate, string id, string tileUri, string toastUri, bool enabled, bool enabledToast, bool isTrial)
        {
            /*
            http://fboscari.altervista.org/Vodafone/ManageUris.php?
             * username=gmrfcb&
             * password=gmrfcb&
             * number=3477566391&
             * contract=Mobile Internet&
             * isFirstNumber=1&
             * showDate=1&  
             * uri=1
             */
            string s = "username=" +
                username
                + "&password=" +
                password
                + "&number=" +
                number;
            if (showDate)
                s += "&showDate=1";
            if(isFirstNumber)
                s += "&isFirstNumber=1";
            s += "&contract=" +
                type;
            s += "&tileUri=" +
                tileUri;
            s += "&toastUri=" +
                toastUri;
            s += "&id=" +
                id;
            if (!enabled)
                s += "&enabled=0";
            if (!enabledToast)
                s += "&enabledToast=0";
            if (isTrial)
                s += "&isTrial=1";
            else
                s += "&isTrial=0";
            return s;
        }

    }
}
